package com.jingxi.rest.controller;

import com.jingxi.common.pojo.JingXiResult;
import com.jingxi.rest.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/item")
public class ItemController {
    @Autowired
    ItemService itemService;
    @RequestMapping("/info/{itemId}")
    @ResponseBody
    public JingXiResult getItemBaseInfo(@PathVariable long itemId){
        JingXiResult result=itemService.getItemBaseInfo(itemId);
        return result;

    }
    @RequestMapping("/desc/{itemId}")
    @ResponseBody
    public JingXiResult getItemBaseDesc(@PathVariable long itemId){
        JingXiResult result=itemService.getItemBaseDesc(itemId);
        return result;

    }
    @RequestMapping("/param/{itemId}")
    @ResponseBody
    public JingXiResult getItemBaseParam(@PathVariable long itemId){
        JingXiResult result=itemService.getItemBaseParam(itemId);
        return result;

    }

}
